class Solution:
    def duplicateNumbersXOR(self, nums: list[int]) -> int:
        return reduce(xor, nums + list(set(nums)))